﻿using System;
using System.Collections.Generic;
using System.Text;
using HotelDal;
using IHodelBll;
using IHotelDal;
using Model;


namespace HodelBll
{
  public   class RoomsBLL:IRoomsBLL
    {
        IRoomsDal _dal;

        /// <summary>
        /// 构造函数注入
        /// </summary>
        /// <param name="dal"></param>
        public RoomsBLL(IRoomsDal dal)
        {
            _dal = dal;
        }

        /// <summary>
        /// 添加客房
        /// </summary>
        /// <param name="rooms"></param>
        /// <returns></returns>
        public int AddRoom(RoomList list)
        {
            return _dal.AddRoom(list);
        }
        //
        /// <summary>
        /// 删除客房信息
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        public int DelRoom(int aid)
        {
            return _dal.DelRoom(aid);
        }

        /// <summary>
        /// 修改客房信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int UptRoom(RoomList m)
        {
            return _dal.UptRoom(m);
        }     

        /// <summary>
        /// 显示查询客房信息
        /// </summary>
        /// <returns></returns>    
        public List<RoomsModel> RoomModels()
        {
            return _dal.RoomsModels();
        }

        public List<RoomType> RoomsType()
        {
            return _dal.RoomsType();
        }
    }
}
